using UnityEngine;

namespace Function.SAsset
{
    public class BaseScene : MonoBehaviour
    {
        // protected SceneType _sceneType = SceneType.Unknown;
        // public SceneType SceneType => _sceneType;

        public string SceneName => this.gameObject.scene.name;

        protected virtual void Awake()
        {
            ($"[scene] start {GetType().Name}.Awake").Log();
        }

        public virtual void OnDestroy()
        {
            ($"[scene] start {GetType().Name}.OnDestroy").Log();
        }

        // 即将被卸载
        public virtual void OnBeforeUnload()
        {
            ($"[scene] start {GetType().Name}.OnBeforeUnload").Log();
        }

        // 加载完成
        public virtual void OnAfterLoaded()
        {
            ($"[scene] start {GetType().Name}.OnAfterLoaded").Log();
        }
    }
}